//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.DataLayer.ServiceModel
{
    using System;

    /// <summary>
    /// Represents available user roles
    /// </summary>
    public enum UserRole
    {
        /// <summary>
        /// Admin role
        /// </summary>
        Admin,

        /// <summary>
        /// Normal user role
        /// </summary>
        /// 
        NormalUser,

        /// <summary>
        /// Guest user
        /// </summary>
        Guest,

        /// <summary>
        /// Service user
        /// </summary>
        Service,

        /// <summary>
        /// Invalid user
        /// </summary>
        InValid
    }

    /// <summary>
    /// The category model.
    /// </summary>
    [Serializable]
    public class UserModel : BaseModel
    {
        private UserRole role;

        /// <summary>
        /// Gets or sets the role.
        /// </summary>
        /// <value>The role.</value>
        public UserRole Role
        {
            get
            {
                return role;
            }

            set
            {
                role = value;
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryModel"/> class.
        /// </summary>
        /// <param name="category">The category.</param>
        public UserModel(User currentUser)
        {
            this.Name = currentUser.Name;
            this.Id = (currentUser as IObject).ID;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="UserModel"/> class.
        /// </summary>
        public UserModel()
        {
        }
    }
}
